package com.highcom.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.util.UrlPathHelper;

@Configuration(proxyBeanMethods = false)
public class MyWebConfig /*implements WebMvcConfigurer*/ {

      @Bean
      public WebMvcConfigurer webMvcConfigurer(){
            return new WebMvcConfigurer() {
                @Override
                public void configurePathMatch(PathMatchConfigurer configurer) {
                            UrlPathHelper urlPathHelper = new UrlPathHelper();
                            urlPathHelper.setRemoveSemicolonContent(false);//不移除分号后的内容
                            configurer.setUrlPathHelper(urlPathHelper);
                }
            };
      }

//    @Override
//    public void configurePathMatch(PathMatchConfigurer configurer) {
//        UrlPathHelper urlPathHelper = new UrlPathHelper();
//        urlPathHelper.setRemoveSemicolonContent(false);//不移除分号后的内容
//        configurer.setUrlPathHelper(urlPathHelper);
//    }
}
